package com.survey.system.service.impl;

import java.util.List;
import com.survey.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.survey.system.mapper.SurFollowupMapper;
import com.survey.system.domain.SurFollowup;
import com.survey.system.service.ISurFollowupService;

/**
 * 追问信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-23
 */
@Service
public class SurFollowupServiceImpl implements ISurFollowupService 
{
    @Autowired
    private SurFollowupMapper surFollowupMapper;

    /**
     * 查询追问信息
     * 
     * @param followupId 追问信息主键
     * @return 追问信息
     */
    @Override
    public SurFollowup selectSurFollowupByFollowupId(Long followupId)
    {
        return surFollowupMapper.selectSurFollowupByFollowupId(followupId);
    }

    /**
     * 查询追问信息列表
     * 
     * @param surFollowup 追问信息
     * @return 追问信息
     */
    @Override
    public List<SurFollowup> selectSurFollowupList(SurFollowup surFollowup)
    {
        return surFollowupMapper.selectSurFollowupList(surFollowup);
    }

    /**
     * 新增追问信息
     * 
     * @param surFollowup 追问信息
     * @return 结果
     */
    @Override
    public int insertSurFollowup(SurFollowup surFollowup)
    {
        surFollowup.setCreateTime(DateUtils.getNowDate());
        return surFollowupMapper.insertSurFollowup(surFollowup);
    }

    /**
     * 修改追问信息
     * 
     * @param surFollowup 追问信息
     * @return 结果
     */
    @Override
    public int updateSurFollowup(SurFollowup surFollowup)
    {
        surFollowup.setUpdateTime(DateUtils.getNowDate());
        return surFollowupMapper.updateSurFollowup(surFollowup);
    }

    /**
     * 批量删除追问信息
     * 
     * @param followupIds 需要删除的追问信息主键
     * @return 结果
     */
    @Override
    public int deleteSurFollowupByFollowupIds(Long[] followupIds)
    {
        return surFollowupMapper.deleteSurFollowupByFollowupIds(followupIds);
    }

    /**
     * 删除追问信息信息
     * 
     * @param followupId 追问信息主键
     * @return 结果
     */
    @Override
    public int deleteSurFollowupByFollowupId(Long followupId)
    {
        return surFollowupMapper.deleteSurFollowupByFollowupId(followupId);
    }
}
